package com.shxc.smarttrade.dialogactivity;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.shxc.smarttrade.R;
import com.shxc.smarttrade.base.NoActionBarBaseActivity;
import com.shxc.smarttrade.tigerwit.activity.TigerwitOpenAccountActivity;

import org.xchris.view.annotation.ContentView;
import org.xchris.view.annotation.Event;
import org.xchris.view.annotation.ViewInject;

/**
 * Tiger - error
 */
@ContentView(R.layout.activity_dialog_tiger_error)
public class TigerErrorDialogActivity extends NoActionBarBaseActivity {

    @ViewInject(R.id.error_textview)
    TextView error_textview;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        bundle = getIntent().getExtras();
        error_textview.setText("原因：" + bundle.getString("error"));
    }

    @Event({R.id.close_imageview, R.id.change_view})
    private void onClick(View view) {
        switch (view.getId()) {
            case R.id.close_imageview:
                finish();
                break;
            case R.id.change_view:
                //重新开户
                JumpTo(TigerwitOpenAccountActivity.class);
                finish();
                break;
        }
    }

    protected void overridePendingTransitionEnter() {
        overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left);
    }
}
